package com.yangye.springclouddemosharding.service.impl;

import com.yangye.springclouddemosharding.entity.Temperature;
import com.yangye.springclouddemosharding.mapper.TemperatureMapper;
import com.yangye.springclouddemosharding.service.TemperatureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yangye
 * @date 2020/08/31
 */
@Service
public class TemperatureServiceImpl implements TemperatureService {

	@Autowired
	private TemperatureMapper temperatureMapper;

	@Override
	public Long save(Temperature temperature) {
		return temperatureMapper.insert(temperature);
	}

	@Override
	public List<Temperature> findPage(long offset, long size) {
		return temperatureMapper.selectPage(offset, size);
	}
}
